package com.sun;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class ALFirst {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int x;

        for (int i = 0; i < n; i++) {
            int m = sc.nextInt();

            ArrayList<String> arrayList = new ArrayList<>();
            for (int j = 0; j < m; j++) {
                arrayList.add(Integer.toBinaryString(sc.nextInt()));
            }
            System.out.println(arrayList);
        }
    }
}
